home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 14471 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  794 b 

  1. Path: maine.maine.edu!io92118
  2. Organization: University of Maine System
  3. Date: Sat, 30 Mar 1996 20:23:03 EST
  4. From: <IO92118@MAINE.MAINE.EDU>
  5. Message-ID: <96090.202303IO92118@MAINE.MAINE.EDU>
  6. Newsgroups: comp.lang.c++
  7. Subject: Help for integer multiplication???
  8.  
  9. Hi:
  10.  
  11. I want to write a program to do integer multiplication.
  12.  
  13. 1101 1110 1010 0001
  14. 1010 1101 0010 1010
  15. -------------------
  16.  
  17. for normal method, it's time complexity is n square.
  18.  
  19. if I devide it into two parts.
  20. 2**(n/2)*1101 1110 + 1010 0001
  21. 2**(n/2)*1010 1101 + 0010 1010   this is 3**(log(n)) much faster.
  22. -------------------------------
  23. ** means to the power. exactly 2**(n/2) mean shift.
  24.  
  25. If I want to a program, how to represent 1101 1110 1010 0001 ???
  26. Can I just decimal number or not, or something else???
  27.  
  28. Thank you very much!!!
  29.